﻿@model GameSchool.Models.ChangePasswordModel

@{
    ViewBag.Title = "Change Password";
}
<link rel="stylesheet" type="text/css" href="/Content/css/forms.css" />

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Ekki tókst að breyta lykilorði, athugið innslátt.")
    <div>
        <fieldset>
            <legend>Breyta lykilorði</legend>

            <div class="editor-label">
                <h2>Núverandi lykilorð:</h2>
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.OldPassword)
                @Html.ValidationMessageFor(m => m.OldPassword)
            </div>

            <div class="editor-label">
                <h2>Nýtt lykilorð:</h2>
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.NewPassword)
                @Html.ValidationMessageFor(m => m.NewPassword)
            </div>

            <div class="editor-label">
                <h2>Staðfesta nýtt lykilorð:</h2>
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>

                     <h2>
       Ný lykilorð verða að vera @Membership.MinRequiredPasswordLength stafir að lengd.
                </h2>
            <section class="buttonfield"> 
                <section class="one-third last">
                     <input type="submit" value="Vista" class="sendbutton" name="sendbutton" /> 
                </section>  
             </section>
        </fieldset>
    </div>
}
